package com.tchintech.pay.delegate;

import android.support.v4.view.ViewPager;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.tchintech.pay.R;
import com.tchintech.pay.frame.view.AppDelegate;

import butterknife.Bind;
import butterknife.BindColor;

/**
 * Created by Administrator on 2017/7/11 0011.
 */

public class MessageDelegate extends AppDelegate {
    //  @Bind(R.id.)
    @Bind(R.id.vp_message)
    ViewPager vp;
    @Bind(R.id.tv_public)
    TextView tv_public;
    @Bind(R.id.tv_private)
    TextView tv_private;
    @Bind(R.id.lin_public)
    LinearLayout lin_public;
    @Bind(R.id.lin_private)
    LinearLayout lin_private;

    @Bind(R.id.real_public)
    RelativeLayout real_public;
    @Bind(R.id.real_private)
    RelativeLayout real_private;

    @Bind(R.id.tv_title)
    TextView tv_title;
    @Bind(R.id.iv_back)
    ImageView iv_back;

    @BindColor(R.color.login_blue)
    int selected_color;
    @BindColor(R.color.gary_bg)
    int unselected_color_black_gray;
    @BindColor(R.color.white)
    int unselected_color_white;

    @Override
    public int getRootLayoutId() {
        return R.layout.activity_message;
    }

    public ViewPager getVp() {
        return vp;
    }

    public ImageView getback(){
        return iv_back;
    }
    public TextView getTitle(){
        return tv_title;
    }


    //选中ui更改
    public void selectTitle(int page) {
        tv_public.setTextColor(unselected_color_black_gray);
        tv_private.setTextColor(unselected_color_black_gray);
        lin_public.setBackgroundColor(unselected_color_white);
        lin_private.setBackgroundColor(unselected_color_white);
        if (page == 0) {
            tv_public.setTextColor(selected_color);
            lin_public.setBackgroundColor(selected_color);
        } else {
            tv_private.setTextColor(selected_color);
            lin_private.setBackgroundColor(selected_color);
        }

    }
}
